﻿using System;
using System.Diagnostics;
using System.Reflection;
using System.Windows;

namespace Aeon.Emulator.Launcher
{
    /// <summary>
    /// Aeon about box.
    /// </summary>
    internal sealed partial class AboutWindow : Window
    {
        #region Constructors
        /// <summary>
        /// Initializes a new instance of the AboutWindow class.
        /// </summary>
        public AboutWindow()
        {
            InitializeComponent();
        }
        #endregion

        #region Protected Methods
        /// <summary>
        /// Invoked when the window is initialized.
        /// </summary>
        /// <param name="e">Empty EventArgs instance.</param>
        protected override void OnInitialized(EventArgs e)
        {
            var version = Assembly.GetAssembly(typeof(AboutWindow)).GetName().Version;

            buildLabel.Content = "Build " + version.ToString();
                
            base.OnInitialized(e);
        }
        #endregion

        #region Event Handlers
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
        private void Hyperlink_Click(object sender, RoutedEventArgs e)
        {
            Process.Start("http://discutils.codeplex.com");
        }
        #endregion
    }
}
